The Ray Tree

When ray tracing a scene, reflected or transmitted rays may strike other reflective or transparent objects. Further reflected or transmitted rays will be spawned, and so on. Taken together, such a family of rays is termed the <#215#>ray tree<#215#>. Care must be taken to control the depth of this tree: If it is allowed to grow too deeply, one may spend a great deal of time computing rays that contribute little to the final picture; if it is not allowed to grow far enough, this premature tree pruning may be evident in the image.

<#216#><#2128#>Rayshade<#2128#><#216#> provides two complementary methods for controlling the depth of the ray tree. One method sets an absolute maximum for the tree. The other allows one to adaptively prune a tree as it grows so that ``unimportant'' rays are not spawned.

<#5685#><#5685#>
<#1430#>maxdepth<#1430#> <#1431#>level<#1431#>
Do not spawn rays deeper than those at the given <#220#>level<#220#>.
Rays from the eye are of depth zero. The default value for <#222#>level<#222#> is 15. This depth may also be set from the command line through the <#223#>-D<#223#> option.

<#5686#><#5686#>
<#1434#>cutoff<#1434#> <#1435#>threshold<#1435#>
Do not spawn rays whose contribution to the final color of the eye ray is less than <#227#>threshold<#227#> for each color channel. Threshold may be given as a single floating-point value, or as a red-green-blue triple.
The default value is 0.002. This threshold may also be set from the command line through the <#229#>-T<#229#> option.